<script setup lang="ts">
    import {ref} from 'vue'
    import mitter from '@/util/mitter'
    let bao = ref('哥哥的宝贝')
</script>
<template>
    <h3>mitter-子组件Child1-{{bao}}</h3>
    <!-- 实现俩个兄弟组件之间的传参 -->
    <button @click="mitter.emit('test',bao)">传数据给Child2</button>
</template>
<style scoped>
   
</style>